package com.market.coupon.server.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.market.coupon.server.mapper.TCouponTypeMapper;
import com.market.coupon.common.domain.TCouponType;
import com.market.coupon.server.service.ITCouponTypeService;

/**
 * 优惠券类型Service业务层处理
 *
 * @author market
 * @date 2024-03-04
 */
@Service
public class TCouponTypeServiceImpl implements ITCouponTypeService
{
    @Autowired
    private TCouponTypeMapper tCouponTypeMapper;

    /**
     * 查询优惠券类型
     *
     * @param couponTypeId 优惠券类型主键
     * @return 优惠券类型
     */
    @Override
    public TCouponType selectTCouponTypeByCouponTypeId(Long couponTypeId)
    {
        return tCouponTypeMapper.selectTCouponTypeByCouponTypeId(couponTypeId);
    }

    /**
     * 查询优惠券类型列表
     *
     * @param tCouponType 优惠券类型
     * @return 优惠券类型
     */
    @Override
    public List<TCouponType> selectTCouponTypeList(TCouponType tCouponType)
    {
        return tCouponTypeMapper.selectTCouponTypeList(tCouponType);
    }

    /**
     * 新增优惠券类型
     *
     * @param tCouponType 优惠券类型
     * @return 结果
     */
    @Override
    public int insertTCouponType(TCouponType tCouponType)
    {
        return tCouponTypeMapper.insertTCouponType(tCouponType);
    }

    /**
     * 修改优惠券类型
     *
     * @param tCouponType 优惠券类型
     * @return 结果
     */
    @Override
    public int updateTCouponType(TCouponType tCouponType)
    {
        return tCouponTypeMapper.updateTCouponType(tCouponType);
    }

    /**
     * 批量删除优惠券类型
     *
     * @param couponTypeIds 需要删除的优惠券类型主键
     * @return 结果
     */
    @Override
    public int deleteTCouponTypeByCouponTypeIds(Long[] couponTypeIds)
    {
        return tCouponTypeMapper.deleteTCouponTypeByCouponTypeIds(couponTypeIds);
    }

    /**
     * 删除优惠券类型信息
     *
     * @param couponTypeId 优惠券类型主键
     * @return 结果
     */
    @Override
    public int deleteTCouponTypeByCouponTypeId(Long couponTypeId)
    {
        return tCouponTypeMapper.deleteTCouponTypeByCouponTypeId(couponTypeId);
    }
}
